import model.Game;
import model.Hockeyist;
import model.Move;
import model.World;

public final class MyStrategy implements Strategy {
    @Override
    public void move(Hockeyist self, World world, Game game, Move move) {
        Coords.init(world, game);
        Moving.init(self, world, game, move);

//        AbstractStrategy strategy = new Test(self, world, game, move);
        AbstractStrategy strategy = null;
        if (world.getPuck().getOwnerPlayerId() == -1) {
            strategy = new Pickup(self, world, game, move);
        }else if(world.getPuck().getOwnerPlayerId()!=world.getMyPlayer().getId()){
            strategy = new Defend(self, world, game, move);
        } else {
            strategy = new Attack(self, world, game, move);
        }
        strategy.run();
    }
}
